package com.xmy.cultivate.service;

import com.xmy.cultivate.entity.Grade;
import com.xmy.cultivate.entity.StudentAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.StudentGrade;
import com.xmy.cultivate.util.Result;
import org.springframework.scheduling.annotation.Async;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hpiggy
 * @since 2023-07-15
 */
public interface IStudentAccountService extends IService<StudentAccount> {


    public abstract StudentAccount getOneForStudentId(Long studentId);

    public abstract Result updateAccount(Long studentId);

    /**
     * 添加帐号
     * @param schoolId
     * @param studentId
     * @param gradeId
     * @param courseId
     * @return
     */
    Result applyAddStudentAccount(Long schoolId, Long studentId, Long gradeId, Long courseId);

    void updateClassType(Integer yearPart, Integer quarterNum, Long subjectsId, Long studentId);

    @Async("onlineAsync")
    void updateClassTypeForStudentGrade(StudentGrade studentGrade);

    public abstract boolean updateClassTypeForGrade(Grade grade);

    String getAccountByStudentId(Long studentId);

}
